<% title_tag t(".Settings"), @repository.name %>


<%= render "menu" %>
<div class="col-12 col-md-9 float-left">
  <div class="advanced-transfer mb-section">
    <h1 class="title mb-3"><%= t(".Transfer") %></h1>
    <div class="text-gray">
      <%= t(".Transfer ownership") %>
    </div>
    <div class="text-gray-light mb-button">
      <%= t(".Transfer this repository to another user or to an group") %>
    </div>
    <%= render "transfer" %>
  </div>

  <%= form_with(model: @repository, url: user_repository_settings_path(@user, @repository),  remote: true, method: :patch) do |form| %>
    <h1 class="title mb-3"><%= t(".Danger Zone") %></h1>
    <% if params[:_by] == "danger-zone" %>
      <%= render "/shared/error_messages", target: @repository %>
    <% end %>
    <input type="hidden" name="_action" value="advanced" />
    <input type="hidden" name="_by" value="danger-zone" />

      <div class="text-gray">
        <% if @repository.private? %>
          <%= t(".Make this repository public") %>
        <% else %>
          <%= t(".Make this repository private") %>
        <% end %>
      </div>
      <div class="text-gray-light mb-button">
        <% if @repository.private? %>
          <%= t(".Public this repository from the private") %>
        <% else %>
          <%= t(".Private this repository from the public") %>
        <% end %>
      </div>
      <%= render "privacy" %>
      <div class="text-gray">
        <%= t(".Delete this repository") %>
      </div>
      <div class="text-gray-light mb-button">
        <%= t(".Once you delete a repository, there is no going back") %>
      </div>
      <%= render "destroy" %>
  <% end %>
</div>
